STATEMENT:  do...while


do statements while (condition);
 
The do...while statement executes one or more statements at least once, checking that a certain condition is met each time before repeating. If that condition is not met, then control moves to the statement immediately after the loop. The following example counts up in twos for as long as the number is less than 20:
 
var i = 0;
do
{
   document.write(i + ".<BR>");
   i+=2;
}
while(i<20);


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information